#include <iostream>
#include <string>
using namespace std;

int main()
{
    string openn, t;
    getline(cin, openn);
    int a = openn.size();
    for (int i = 0;i<a;i++)
    {
        if((openn[i] == '(' &&t[t.size()-1]=='(')||(openn[i] == '<' &&t[t.size()-1]=='<')||(openn[i] == '[' &&t[t.size()-1]=='[')||(openn[i] == '{' &&t[t.size()-1]=='{'))
        {
            t += openn[i];
        }
        if((openn[i] == ')' &&t[t.size()-1]==')')||(openn[i] == '>' &&t[t.size()-1]=='>')||(openn[i] == ']' &&t[t.size()-1]==']')||(openn[i] == '}' &&t[t.size()-1]=='}'))
        {
            t.erase(t.size()-1);
        }
        else if((openn[i] == '(' &&t[t.size()-1]!=')')||(openn[i] == '<' &&t[t.size()-1]!='>')||(openn[i] == '[' &&t[t.size()-1]!=']')||(openn[i] != '{' &&t[t.size()-1]!='}'))
        {
            break;
        }

    }
            if(t == "")
        {
            cout<<"The right combination :3";
        }
        else
        {
            cout<<"Wrong combination :[";
        }
}
